//
// Created by none98 on 2021/9/14.
//

#ifndef LOGINSERVER_CALLBACKS_H
#define LOGINSERVER_CALLBACKS_H
#include <functional>
#include <memory>
class TcpConnection;
class Buffer;

using TcpConnectionPtr = std::shared_ptr<TcpConnection>;
//for user
typedef std::function<void(TcpConnectionPtr,Buffer*)> MessageCallBack;
typedef std::function<void(TcpConnectionPtr)> TcpCallBack;

//for TcpServer callback
typedef std::function<void(TcpConnectionPtr)> CloseInServerCallBack;
typedef std::function<void(TcpConnectionPtr)> RegisterCallBack;
typedef std::function<void()> TimerCallBack;

#endif //LOGINSERVER_CALLBACKS_H
